<?php

require_once("functions.php");

$db=connectDB();
$sql="SELECT name,pins,avg,score,hcp FROM bowlers ORDER BY name ASC";
$result=$db->query($sql);
dieError($result,$sql);
?>
<html>
<head>
<title>Lane Sheet</title>
</head>
<body>
<table width="600" cellpadding="5" border="0" cellspacing="0">
<tr>
	<td style="font-weight: bold">Bowler</td>
	<td style="font-weight: bold">Pins</td>
	<td style="font-weight: bold">Average</td>
	<td style="font-weight: bold">Score</td>
	<td style="font-weight: bold">Handicap</td>
	<td style="font-weight: bold">Game 1</td>
	<td style="font-weight: bold">Game 2</td>
	<td style="font-weight: bold">Game 3</td>
	<td style="font-weight: bold">Game 4</td>
</tr>
<tr><td colspan="9"><hr></td></tr>
<?php
while(($row=$result->fetchRow())) {
	print "<tr>\n";
	foreach($row as $r) {
		print "\t<td>{$r}</td>\n";
	}
	print "\t<td style=\"text-decoration: underline;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
	print "\t<td style=\"text-decoration: underline;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
	print "\t<td style=\"text-decoration: underline;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
	print "\t<td style=\"text-decoration: underline;\">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>\n";
	
	
	print "</tr>\n";
	print "<tr><td colspan=\"9\"><hr></td></tr>\n";
}
?>
</table>
<p><a href="index.php">Home</a></p>
</body>
</html>
